#!/usr/bin/env bash
# Copyright ©2017-2023 Jason Trunks
# https://notabug.org/JasKinasis/cmus-scripts

# Send a message to all pty's
# This was something I was considering using alongside nowplay and statustty
# But this sends the message to all open tty's, including the one running cmus
# and vim etc.. XD

# 2020-07-06 - NOTE: pty's don't seem to be used in Debian any-more, so this script no longer works.
if [[ $# == 1 ]]; then

	ptys="$(ls /dev | \grep pty)"
	for line in $(echo -e "$ptys")
	do
		echo "$1" > "/dev/$line"
	done
fi

